<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../head/head.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><spring:message code="window.account.info"/></title>
<script type="text/javascript">
//禁用
var button_disable='<spring:message code="button.account.disable"/>';
//解禁
var button_undisable='<spring:message code="button.account.undisable"/>';
//注销
var button_erase='<spring:message code="button.account.erase"/>';
//解锁
var button_unlocked='<spring:message code="button.account.unlocked"/>';
//注销提示信息  
var erase = '<spring:message code="lable.accountstate.erase"/>';
var message_info_modify_select_erase='<spring:message code="message.info.modify.select" arguments="'+erase+'"/>';
//只能注销状态为有效的数据
var message_info_erase ='<spring:message code="message.info.account.erase"/>';
//只能注销状态为有效的数据
var message_info_disable ='<spring:message code="message.info.account.disable"/>';
//只能解禁状态为禁用的数据
var message_info_undisable ='<spring:message code="message.info.account.undisable"/>';
//只能解锁状态为锁定的数据
var message_info_unlocked ='<spring:message code="message.info.account.unlocked"/>';

//提交路径

//初始化帐户
var initAccount_= '<z:ukey key="initAccount"  context="admin"/>';
//修改帐户状态
var unregisteraccount_= '<z:ukey key="unRegisterAccount"  context="admin"/>';
//取得帐户信息（椐据ID)
var getaccount_= '<z:ukey key="getAccount"  context="admin"/>';

//注册用户登录帐号
var registeraccount_= '<z:ukey key="registerAccount"  context="admin"/>';
//修改账户信息
var updateaccount_= '<z:ukey key="updateAccount"  context="admin"/>';
//邮件唯一性的校验
var existemail_= '<z:ukey key="existEmail"  context="admin"/>';
//手机唯一性的校验
var existmobile_= '<z:ukey key="existMobile"  context="admin"/>';
//账户唯一性的校验
var existaccount_= '<z:ukey key="existAccount"  context="admin"/>';

//应用系统
var findallrole_= '<z:ukey key="findAllRole"  context="admin"/>';
var accountinfo_ = '<z:ukey key="accountInfo"  context="admin"/>';

var findallrole_role_ =findallrole_+"?jsoncallback=?";

</script>
<script type="text/javascript" src="<%=localServer%>/page/app/account.js"></script>
<script type="text/javascript" src="<%=localServer%>/js/common/baseutil.js"></script>
<script type="text/javascript" src="<%=localServer%>/js/common/base_button.js"></script>
</head>
<body>
	<table id="accountList" toolbar="#account_list_button">

		<thead>
			<tr>
				<th field="ck" checkbox="true"></th>
				<th field="id" width="80" align="center"><spring:message code="lable.id"/></th>
				<th field="account" width="80" align="center"><spring:message code="lable.account.account"/></th>
				<th field="accountNm" width="80" align="center"><spring:message code="lable.account.accountnm"/></th>
				<th field="userMobile" width="80" align="center"><spring:message code="lable.account.usermobile"/></th>
				<th field="userEmail" width="80" align="center"><spring:message code="lable.account.useremail"/></th>
				<th field="roles" width="80" align="center"><spring:message code="lable.account.arrelations"/></th>
				<th field="status" width="150" align="center"><spring:message code="lable.account.status"/></th>
			</tr>
		</thead>
	</table>
	<div id="account_list_button" style="height: auto">
		<table width="900px">
			<!-- 用于显示所选择的项目 -->
			<tr>
				<td height="24" nowrap="nowrap" width="30px"><spring:message code="lable.account.account"/></td>
				<td nowrap="nowrap" width="170px"><input id="account"
					style="line-height: 18px; border: 1px solid #ccc" /></td>
				<td nowrap="nowrap" width="30px"><spring:message code="lable.account.usermobile"/></td>
				<td nowrap="nowrap" width="170px"><input id="userMobile"
					style="line-height: 18x; border: 1px solid #ccc" /></td>
				<td nowrap="nowrap" width="30px"><spring:message code="lable.account.useremail"/></td>
				<td nowrap="nowrap" width="170px"><input id="userEmail"
					style="line-height: 18x; border: 1px solid #ccc"
					class="easyui-validatebox" /></td>
				<td nowrap="nowrap" width="30px"><spring:message code="lable.account.arrelations"/></td>
				<td nowrap="nowrap" width="175px"><select
					class="easyui-combotree" onlyLeafCheck="true" name="language" panelHeight="auto"
					url='<z:ukey key="findAllRole"  context="admin"/>?jsoncallback=?' multiple="true" cascadeCheck="false"
					style="width: 155px;" id="roles"></select></td>
			</tr>
			<tr>
				<td nowrap="nowrap"><spring:message code="lable.account.status"/></td>
				<td colspan="6" nowrap="nowrap"><input type="checkbox"
					name="status" value="DISABLE" /><spring:message code="lable.accountstate.erase"/><input type="checkbox"
					name="status" value="ACTIVE" /><spring:message code="lable.accountstate.active"/><input type="checkbox"
					name="status" value="INACTIVE" /><spring:message code="lable.accountstate.inactive"/><input type="checkbox"
					name="status" value="LOCKED" /><spring:message code="lable.accountstate.locked"/></td>
				<td nowrap="nowrap"><div align="right">
						<a href="javascript:void(0)" class="easyui-linkbutton"
							plain="true" iconCls="icon-search" onClick="doSearch()"><spring:message code="button.search"/></a><span>&nbsp;&nbsp;</span>
				</div></td>
			</tr>
		</table>
	</div>
	<!-- 编辑账户-->
	<div id="edit_account"
		style="display: none; width: 300px; height: 220px; top: 0px; left: 0px;"
		title='<spring:message code="window.account.edit"/>'>
		<form id="edit_account_form" method="post">
			<table width="280px" border="0">
				<tr>
					<td><div align="right"><spring:message code="lable.account.account"/></div></td>
					<td><div align="left">
							<input type="hidden" name="id" id="id"> <input
								type="text" class="easyui-validatebox" value="" name="account" invalidMessage="{remote:'<spring:message code="message.info.account.existaccount"/>'}"
								required="true" id="account_" event="change" validType ="loginName&length[1,8]&remote[existaccount_+'?accountId='+$('#id').val(),'account','jsoncallback=?']"/>
						</div></td>
				</tr>
				<tr>

					<td><div align="right"><spring:message code="lable.account.accountnm"/></div></td>
					<td><div align="left">
							<input type="text" class="easyui-validatebox" value=""
								name="accountNm" required="true"/>
						</div></td>
				</tr>
				<tr>
					<td><div align="right"><spring:message code="lable.account.usermobile"/></div></td>
					<td><div align="left">
							<input type="text" class="easyui-validatebox" value="" invalidMessage="{remote:'<spring:message code="message.info.account.existmobile"/>'}"
								name="userMobile" validType="mobile&remote[existmobile_+'?accountId='+$('#id').val(),'userMobile','jsoncallback=?']" event="change"/>
						</div></td>
				</tr>
				<tr>
					<td><div align="right"><spring:message code="lable.account.useremail"/></div></td>
					<td><div align="left">
							<input type="text" class="easyui-validatebox" value="" invalidMessage="{remote:'<spring:message code="message.info.account.existemail"/>'}"
								name="userEmail" required="true" validType="email&remote[existemail_+'?accountId='+$('#id').val(),'userEmail','jsoncallback=?']" event="change" />
						</div></td>
				</tr>
				<tr id="roles_tr">
					<td><div align="right"><spring:message code="lable.account.arrelations"/></div></td>
					<td><div align="left">
							<select name="roles" style="width: 155px" id="edit_roles"></select>
						</div></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>